<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<script language="javascript" type="text/javascript">
		function ajaxFunctionlike(){
			var ajaxRequest;  // The variable that makes Ajax possible!
			
			try{
				// Opera 8.0+, Firefox, Safari
				ajaxRequest = new XMLHttpRequest();
			} catch (e){
				// Internet Explorer Browsers
				try{
					ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
				} catch (e) {
					try{
						ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
					} catch (e){
						// Something went wrong
						alert("Your browser broke!");
						return false;
					}
				}
			}
			var no = document.getElementById('no').value;
			// Create a function that will receive data sent from the server
			ajaxRequest.onreadystatechange = function(){
				if(ajaxRequest.readyState == 4){
					var ajaxDisplay = document.getElementById('ajaxDivlike'+no);
					ajaxDisplay.innerHTML = ajaxRequest.responseText;
				}
			}
			
			var username = document.getElementById('username').value;
			var id_berita = document.getElementById('id_berita').value;
			var queryString = "?username=" + username + "&id_berita=" + id_berita;
			ajaxRequest.open("GET", "ajax_example.php" + queryString +"&id=semuaberitalike_3", true);
			ajaxRequest.send(null); 
		}
		function ajaxFunctiondislike(){
			var ajaxRequest;  // The variable that makes Ajax possible!
			
			try{
				// Opera 8.0+, Firefox, Safari
				ajaxRequest = new XMLHttpRequest();
			} catch (e){
				// Internet Explorer Browsers
				try{
					ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
				} catch (e) {
					try{
						ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
					} catch (e){
						// Something went wrong
						alert("Your browser broke!");
						return false;
					}
				}
			}
			// Create a function that will receive data sent from the server
			ajaxRequest.onreadystatechange = function(){
				if(ajaxRequest.readyState == 4){
					var ajaxDisplay = document.getElementById('ajaxDivdislike');
					ajaxDisplay.innerHTML = ajaxRequest.responseText;
				}
			}
			var username = document.getElementById('username').value;
			var id_berita = document.getElementById('id_berita').value;
			var queryString = "?username=" + username + "&id_berita=" + id_berita;
			ajaxRequest.open("GET", "ajax_example.php" + queryString +"&id=semuaberitadislike_3", true);
			ajaxRequest.send(null); 
		}
		</script>
</body>
</html>
